#pragma once

typedef long HashValue_t;
typedef unsigned long FilePosition_t;
//int         radArray[] = {1,          2,          4,          8,          16,        32,        64,       128};
//HashValue_t modArray[] = {1073499991, 1073499991, 1073499991, 1073499991, 536799997, 268399993, 89399987, 16699901};


HashValue_t modpower(HashValue_t base, HashValue_t exp, HashValue_t modulo);
HashValue_t modabs(HashValue_t a, HashValue_t modulo);
HashValue_t modadd(HashValue_t a, HashValue_t b, HashValue_t modulo);
HashValue_t modmult(HashValue_t a, HashValue_t b, HashValue_t modulo);
HashValue_t modmult64(HashValue_t a, HashValue_t b, HashValue_t modulo);
HashValue_t modradpow64(long long radix, int radixPower, HashValue_t modulo);
HashValue_t modradmult64(long long a, HashValue_t radix, int radixPower, HashValue_t modulo);
HashValue_t hash_value(const char *text, int start, int end, HashValue_t radix, HashValue_t modulo);
HashValue_t incr_hash_value(HashValue_t vold, int cold, int cnew, HashValue_t h, HashValue_t radix, HashValue_t modulo);

